﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebApplication1
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DropDownList1.Items.Add("福建");
                DropDownList1.Items.Add("广西");
                DropDownList1.Items.Add("浙江");
            }
        }

        protected void RadioButton1_CheckedChanged(object sender, EventArgs e)
        {

        }

        protected void RadioButton1_CheckedChanged1(object sender, EventArgs e)
        {

        }

        protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e)
        {

        }

        protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
        {
            string province = DropDownList1.SelectedValue;
            DropDownList1.Items.Clear();
            if (province=="福建")
            {
                DropDownList1.Items.Add("福建");
                DropDownList1.Items.Add("广西");
                DropDownList1.Items.Add("浙江");
            }
            else if (province == "广西")
            {
                DropDownList1.Items.Add("柳州");
                DropDownList1.Items.Add("崇左");
                DropDownList1.Items.Add("北海");
            }
            else 
            {
                DropDownList1.Items.Add("温州");
                DropDownList1.Items.Add("台州");
                DropDownList1.Items.Add("杭州");
            }
        }
    }
}